/******************************************************************************
* AIR SYSTEMS LABORATORY
* AEROSPACE ENGINEERING
* UNIVERISTY OF TEXAS AT AUSTIN
* UAV FLIGHT SOFTWARE 
* DESCRIPTION:
*   
*
* SOURCE: 
* Orignial: 08/14/2008  Jorge Alvarez joroge@gmail.com
* Modified: 03/20/2009	Sergio García-Nieto sergarro@isa.upv.es
* $Id: serial.h 4 2009-07-21 17:12:11Z joroge@gmail.com $
*************************************************************************************/

// Check for usb-serial port availability
#define SERUSB_PORT1	"/dev/serusb1"
#define SERUSB_PORT2	"/dev/serusb2"
#define SERUSB_PORT3	"/dev/serusb3"	

// Check for serial port availability
#define SERIAL_PORT1	"/dev/ser1" 
#define SERIAL_PORT2	"/dev/ser2"
#define SERIAL_PORT3    "/dev/ser3"
#define SERIAL_PORT4    "/dev/ser4"

/* Baud rate */
#define	BAUDRATE_9600	B9600
#define BAUDRATE_19200	B19200
#define BAUDRATE_38400	B38400
#define BAUDRATE_57600  B57600
#define BAUDRATE_76800	B76800
#define	BAUDRATE_115200	B115200

/* Serial data structure */
#define s8N1	0		/* 8 data bits,   no parity, 1 stop bit */
#define s8E1	1		/* 8 data bits, even parity, 1 stop bit */	
#define	s8O1	2		/* 8 data bits,  odd parity, 1 stop bit */

#define LINE_MAX  676

/* function prototypes */
int  open_serial(char* serial_port,int baudrate);



